package com.hjq.controller;

import com.hjq.pojo.OperateLog;
import com.hjq.pojo.OperateLogResult;
import com.hjq.pojo.PageResult;
import com.hjq.pojo.Result;
import com.hjq.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Slf4j
@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    private LogService logService;
    @GetMapping("/page")
    public Result findByPage(Integer page,Integer pageSize){
        log.info("日记查询 page:{},pageSize:{}",page,pageSize);
        PageResult<OperateLogResult> result = logService.findByPage(page, pageSize);
        return Result.success(result);
    }
}
